<!doctype html>
<html>
<head>
<meta charset="UTF-8" />
<title>订单详情</title>  
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width,initial-scale=1.0,maximum-scale=1.0,user-scalable=0" />
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<meta name="format-detection" content="telephone=no">
<link rel="stylesheet" type="text/css" href="__PUBLIC__/Wx/css/base.css" />
<link rel="stylesheet" type="text/css" href="__PUBLIC__/Wx/css/detail.css" />
</head>
<body> 
<div class="detail">
	<div class="state">
        <!--待成团--><eq name="copyinfo.copy_state" value="0">
    	<div class="inner">
        	<h2>待成团</h2>
			<span><img src="__PUBLIC__/Wx/img/icon05.png"/></span>
        </div></eq>
        <!--拼团失败--><eq name="copyinfo.copy_state" value="5">
    	<div class="inner">
        	<h2>待成团</h2>
			<span><img src="__PUBLIC__/Wx/img/icon05.png"/></span>
        </div></eq>
        <!--待通知--><eq name="copyinfo.copy_state" value="3">
    	<div class="inner" >
        	<h2>待通知</h2>
			<span><img src="__PUBLIC__/Wx/img/icon20.png"/></span>
        </div></eq>
        <!--待核销--><eq name="copyinfo.copy_state" value="4">
    	<div class="inner" >
        	<h2>待核销</h2>
			<span><img src="__PUBLIC__/Wx/img/icon21.png"/></span>
        </div></eq>
        <!--已核销--><eq name="copyinfo.copy_state" value="6">
    	<div class="inner" >
        	<h2>已核销</h2>
			<span><img src="__PUBLIC__/Wx/img/icon22.png"/></span>
        </div></eq>
    </div>
    <div class="prolist">
    	<div class="pro">
            <div class="pic"><img src="{$copyinfo['h_imgs']}"/></div>	
            <div class="name">
                <h2><b class="md">门店</b>{$copyinfo.title} {$copyinfo.u_num}{$copyinfo.unit}</h2>
                <gt name="copyinfo.need_num" value="0"><h6><span>还差<b>{$copyinfo.need_num}</b>份成团</span></h6></gt>
                <eq name="copyinfo.copy_state" value="3"><h6><span>已订购<b>{$copyinfo.have_num}</b>份</span><span style="float:right">共<b>{$copyinfo['have_num']*$copyinfo['u_num']}</b>{$copyinfo['unit']}</span></h6></eq>
                <eq name="copyinfo.copy_state" value="4"><h6><span><b>{$copyinfo.hold_hx}</b>人待核销</span><span style="float:right">共<b>{$copyinfo['hold_hx']*$copyinfo['u_num']}</b>{$copyinfo['unit']}</span></h6></eq>
                <eq name="copyinfo.copy_state" value="6"><h6><span><b>{$copyinfo.do_hx}</b>人已核销</span><span style="float:right">共<b>{$copyinfo['have_num']*$copyinfo['u_num']}</b>{$copyinfo['unit']}</span></h6></eq>
            </div>
        </div>
    </div>
    <!--待成团--><eq name="copyinfo.copy_state" value="0">
    <div class="people">
    	<h2>已订购<span>{$copyinfo.have_num}</span>份<?php if($copyinfo['need_num']>0)echo "，还差<span>".$copyinfo['need_num']."</span>份成团";?>
        </h2>
        <div class="list">
            <ul>
            <volist name="allmem" id="vo">
                <li>
                    <div class="pic"><img src="{$vo.avatar}"/></div><h3>{$vo.realname}</h3><b>{$vo.hometown}</b>
                </li>
             </volist>  
            </ul>
        </div>
    </div></eq>
    <!--待通知--><eq name="copyinfo.copy_state" value="3">
    <div class="people">
    	<h2>已订购<span>{$copyinfo.have_num}</span>份</h2>
        <div class="list">
            <ul>
            <volist name="allmem" id="vo">
                <li>
                    <div class="pic"><img src="{$vo.avatar}"/></div><h3>{$vo.realname}</h3><b>{$vo.hometown}</b>
                </li>
             </volist>  
            </ul>
        </div>
    </div></eq>
    <!--待核销--><eq name="copyinfo.copy_state" value="4">
    <div class="people" >
    	<h2>已核销<span>{$copyinfo.do_hx}</span>人，还差<span>{$copyinfo.hold_hx}</span>人未核销</h2>
        <div class="list">
            <ul>
            <volist name="allmem" id="vo">
                <li>
                    <div class="pic"><img src="{$vo.avatar}"/></div><h3>{$vo.realname}</h3>
                    <eq name="vo['state']" value="2"><b class="ed">已核销</b></eq>
                    <eq name="vo['state']" value="6"><b>未核销</b></eq>
                </li>
             </volist>  
            </ul>
        </div>
    </div></eq>
    <!--已核销--><eq name="copyinfo.copy_state" value="6">
    <div class="people" >
    	<h2>已核销<span>{$copyinfo.do_hx}</span>人次</h2>
        <div class="list">
            <ul>
            <volist name="allmem" id="vo">
                <li>
                    <div class="pic"><img src="{$vo.avatar}"/></div><h3>{$vo.realname}</h3><b class="ed">已核销</b>
                </li>
             </volist>  
            </ul>
        </div>
    </div></eq>
    
    <!--待成团状态-->
    <eq name="copyinfo.copy_state" value="0"><div class="button"><input type="submit" onClick="do_succ(this)" copyid="{$copyinfo.id}" value="一键成团"/></div></eq>
    <!--待通知-->
    <eq name="copyinfo.copy_state" value="3"><div class="button" style=""><input onClick="do_notice(this)" copyid="{$copyinfo.id}" type="submit" value="发送到货通知"/></div></eq>
</div>
	<script  src="__PUBLIC__/Wx/js/jquery-1.3.1.min.js" type="text/javascript"></script>
	<script type="text/javascript">
		(function($){
			$(function(){
				var $Width = $('.people .list ul').width()/5.3;
				var len = $(".people .list ul li").length;
			//	alert(len);
				$('.people .list ul li').css({'width':$Width});
				$('.people .list ul').css({'width':$Width*len});
			})
		})(jQuery)
		//一键成团
		function do_succ(a){
			//alert($(a).attr('copyid'));
			$.post('__MODULE__/StoreOrder/do_succ/id/'+$(a).attr('copyid')+'/');
			//$(a).parent().parent().remove();
			window.location.reload();
		}//end fun
		//发送到货通知
		function do_notice(a){
			//alert($(a).attr('copyid'));
			$.post('__MODULE__/StoreOrder/do_notice/id/'+$(a).attr('copyid')+'/');
			//$(a).parent().parent().remove();
			window.location.reload();
		}//end fun
	</script>
</body>
</html>